/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Servlets;

import Servlets.input_regex_checks;
/**
 *
 * @author Don
 */
public class regex_checks_2 {
    
    
    
    public boolean mastercheck(String email, String username, String password, String first_name, String middle_name, String last_name, String credit_card_name,
                               String credit_card_number, String credit_card_type, String credit_card_exp_date, String house_no, String street, String subdivision, String city,
                               String postal_code, String country){
        
        int counter = 0;
        input_regex_checks customer = new input_regex_checks();
        if(customer.isValidEmailAddress(email))
            counter++;
        if(customer.lettersNumbers(username))
            counter++;
        if(customer.lettersOnly(first_name))
            counter++;
        if(customer.lettersOnly(middle_name))
            counter++;
        if(customer.lettersOnly(last_name))
            counter++;
        if(customer.lettersOnly(credit_card_name))
            counter++;
        if(customer.numbersOnly(credit_card_number))
            counter++;
        if(customer.lettersOnly(credit_card_type))
            counter++;
        if(customer.dateOnly(credit_card_exp_date))
            counter++;
        if(customer.numbersOnly(house_no))
            counter++;
        if(customer.lettersOnly(street))
            counter++;
        if(customer.lettersOnly(subdivision))
            counter++;
        if(customer.lettersOnly(city))
            counter++;
        if(customer.numbersOnly(postal_code))
            counter++;
        if(customer.lettersOnly(country))
            counter++;
        
        if(counter==15){
            counter=0;
            return true;
        }
        else{
            counter=0;
            return false;
        }
    }
    
    
    
    
}
